package org.soft.carbon_neutral.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.soft.carbon_neutral.entity.Area;
import org.soft.carbon_neutral.mapper.AreaMapper;
import org.soft.carbon_neutral.service.AreaService;
import org.soft.carbon_neutral.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements AreaService {

    @Autowired
    private AreaMapper areaMapper;

    public R getAreaInfo() {
        QueryWrapper<Area> wrapper = new QueryWrapper<>();
        List<Area> areaList = areaMapper.selectList(wrapper);
        return R.success().data("areaList",areaList);
    }
}
